<?=view('admin.common.header')?>
<table class="table">
    <tr>
        <td>工单编号</td>
        <td><?=$job->jnum?></td>
    </tr>
    <tr>
        <td>小区</td>
        <td><?=$job->strPlot()?></td>
    </tr>
    <tr>
        <td>客户姓名</td>
        <td><?=$job->cname?></td>
    </tr>
    <tr>
        <td>联系电话</td>
        <td><?=$job->cphone?></td>
    </tr>
    <tr>
        <td>装机地址</td>
        <td><?=$job->address?></td>
    </tr>
    <tr>
        <td>任务类型</td>
        <td><?=$job->btype?></td>
    </tr>
    <tr>
        <td>原接单人</td>
        <td><?=$job->strRecvName()?></td>
    </tr>
    <tr>
        <td>修改接单人</td>
        <td>
            <select name="iperid" class="form-control">
                <option value="">--请选择接单人--</option>
                <?php foreach($ipers as $val): ?>
                <option value="<?=$val->id?>"><?=$val->name?></option>
                <?php endforeach; ?>
            </select>
        </td>
    </tr>
    <tr>
        <td></td>
        <td><a href="" class="btn btn-success eveChange">转派</a></td>
    </tr>
</table>
<script>
    $('.eveChange').click(function(){
        $(this).attr('disabled', 'disabled');
        var iperid = $('select[name=iperid]').val();
        if ( iperid== '') {
            layer.msg("请选择一个接单人")
        }
        $.get(window.location.href, {iperid:iperid}, function(data) {
            layer.msg(data.info);
            if (data.status == 1) {
                window.parent.location.reload();
            }
        });
        return false;
    });
</script>
<?=view('admin.common.footer')?>